﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DynamicProperties
{
	/// <summary>
	/// Additional parameters of <see cref="DynamicPropertyChangedCallback"/>.
	/// </summary>
	public class DynamicPropertyChangedParams<TOwner, TProperty> where TOwner : class
	{
		public DynamicPropertyChangedParams(DynamicProperty<TOwner, TProperty> property, TProperty oldValue, TProperty newValue)
		{
			this.Property = property;
			this.OldValue = oldValue;
			this.NewValue = newValue;
		}
		
		/// <summary>
		/// Gets dynamic property.
		/// </summary>
		public DynamicProperty<TOwner, TProperty> Property { get; private set; }

		/// <summary>
		/// Gets old value of property.
		/// </summary>
		public TProperty OldValue { get; private set; }

		/// <summary>
		/// Gets new value of property.
		/// </summary>
		public TProperty NewValue { get; private set; }
	}
}
